class Solution(object):
    def findRoot(self, tree):
        a_s = set()
        for node in tree:
            for v in node.children:
                a_s.add(v)
        for node in tree:
            if node not in a_s:
                return node
